//author:kakake
class reportController {
    public data = {
        dbConn: TSLobsterAPI.Program.GetDbConn()
    }

    //报表名称跟方法名相同
    Test(){
        var reportdata = {
            "Table": [
                { "CustomerID": "HUNGC", "CompanyName": "五金机械", "ContactName": "苏先生", "ContactTitle": "销售代表", "Address": "德昌路甲 29 号", "City": "大连", "Region": "东北", "PostalCode": "564576", "Country": "中国", "Phone": "(053) 5556874", "Fax": "(053) 5552376" },
                { "CustomerID": "CENTC", "CompanyName": "三捷实业", "ContactName": "王先生", "ContactTitle": "市场经理", "Address": "英雄山路 84 号", "City": "大连", "Region": "东北", "PostalCode": "130083", "Country": "中国", "Phone": "(061) 15553392", "Fax": "(061) 15557293" },
                { "CustomerID": "CACTU", "CompanyName": "威航货运有限公司", "ContactName": "刘先生", "ContactTitle": "销售代理", "Address": "经七纬二路 13 号", "City": "大连", "Region": "东北", "PostalCode": "120412", "Country": "中国", "Phone": "(061) 11355555", "Fax": "(061) 11354892" },
                { "CustomerID": "BLONP", "CompanyName": "国皓", "ContactName": "黄雅玲", "ContactTitle": "市场经理", "Address": "广发北路 10 号", "City": "大连", "Region": "东北", "PostalCode": "565479", "Country": "中国", "Phone": "(0671) 88601531", "Fax": "(0671) 88601532" },
                { "CustomerID": "MEREP", "CompanyName": "华科", "ContactName": "吴小姐", "ContactTitle": "市场助理", "Address": "和光北路 952 号", "City": "大连", "Region": "东北", "PostalCode": "280235", "Country": "中国", "Phone": "(0514) 5558054", "Fax": "(0514) 5558055" },
                { "CustomerID": "GREAL", "CompanyName": "仪和贸易", "ContactName": "王先生", "ContactTitle": "市场经理", "Address": "经三纬四路 18 号", "City": "北京", "Region": "华北", "PostalCode": "120475", "Country": "中国", "Phone": "(010) 65557555" },
                { "CustomerID": "QUEEN", "CompanyName": "留学服务中心", "ContactName": "赵小姐", "ContactTitle": "市场助理", "Address": "定成路 92 号", "City": "北京", "Region": "华北", "PostalCode": "785878", "Country": "中国", "Phone": "(010) 85551189" },
                { "CustomerID": "QUEDE", "CompanyName": "兰格英语", "ContactName": "王先生", "ContactTitle": "结算经理", "Address": "广安南街 82 号", "City": "北京", "Region": "华北", "PostalCode": "785678", "Country": "中国", "Phone": "(010) 65554252", "Fax": "(010) 65554545" },
                { "CustomerID": "VICTE", "CompanyName": "千固", "ContactName": "苏先生", "ContactTitle": "销售代理", "Address": "明成西街 471 号", "City": "秦皇岛", "Region": "华北", "PostalCode": "598018", "Country": "中国", "Phone": "(071) 8325486", "Fax": "(071) 8325487" },
                { "CustomerID": "OCEAN", "CompanyName": "利合材料", "ContactName": "陈先生", "ContactTitle": "销售代理", "Address": "东临大街 32 号", "City": "秦皇岛", "Region": "华北", "PostalCode": "780005", "Country": "中国", "Phone": "(0117) 1355333", "Fax": "(0117) 1355535" },
                { "CustomerID": "KOENE", "CompanyName": "永业房屋", "ContactName": "谢丽秋", "ContactTitle": "销售员", "Address": "东园大路 78 号", "City": "重庆", "Region": "西南", "PostalCode": "101057", "Country": "中国", "Phone": "(025) 55509876" },
                { "CustomerID": "SAVEA", "CompanyName": "大钰贸易", "ContactName": "胡继尧", "ContactTitle": "销售代表", "Address": "冠成园路 321 号", "City": "重庆", "Region": "西南", "PostalCode": "801023", "Country": "中国", "Phone": "(071) 85558097" }
            ],
            "Master": [
                { "CompanyName": "永大企业", "title": "云报表实例2" }
            ]
        }

        var begindate=TSLobsterAPI.Program.RequestQuery('begindate','');
        if(begindate!=''){
            return {"Master": [
                { "CompanyName": "永大企业", "title": "云报表实例2" }
            ]};
        }

        return reportdata;
    }
}